package cn.luckdou.system.mapper.country;

import cn.luckdou.system.model.country.Country;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
  * 国家 Mapper 接口
 * </p>
 *
 * @author Dadou
 * @since 2017-08-11
 */
public interface CountryMapper extends BaseMapper<Country> {

    @Select("SELECT id AS id ,cname,caname,`type` FROM tb_country WHERE (cname LIKE CONCAT('%',#{q},'%') ) OR (caname LIKE CONCAT('%',#{q},'%')) OR (ename LIKE CONCAT('%',#{q},'%')) OR (eaname LIKE CONCAT('%',#{q},'%')) OR (cname_py LIKE CONCAT('%',#{q},'%')) ")
     List<Country> selectAllListByParamter(String q);
    @Select("SELECT id AS id ,cname,caname,`type` FROM tb_country ")
    List<Country> selectAllList();
}